From 6b173eaf8a95432316822b1d41b084875adfbd83 Mon Sep 17 00:00:00 2001
From: "tri.susilo" <tri.susilo@altama.co.id>
Date: Wed, 8 May 2024 14:47:11 +0700
Subject: [agnes] - Feature category management

---
 src/pages/shop/category/[slug].jsx | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'src/pages/shop/category/[slug].jsx')

diff --git a/src/pages/shop/category/[slug].jsx b/src/pages/shop/category/[slug].jsx
index 1afe30bf..11840d47 100644
--- a/src/pages/shop/category/[slug].jsx
+++ b/src/pages/shop/category/[slug].jsx
@@ -5,6 +5,8 @@ import { useRouter } from 'next/router';
 import Seo from '@/core/components/Seo';
 import { getIdFromSlug, getNameFromSlug } from '@/core/utils/slug';
 import Breadcrumb from '@/lib/category/components/Breadcrumb';
+import { useEffect, useState } from 'react';
+import odooApi from '@/core/api/odooApi';
 
 const BasicLayout = dynamic(() =>
   import('@/core/components/layouts/BasicLayout')
@@ -12,10 +14,14 @@ const BasicLayout = dynamic(() =>
 const ProductSearch = dynamic(() =>
   import('@/lib/product/components/ProductSearch')
 );
+const CategorySection = dynamic(() =>
+  import('@/lib/product/components/CategorySection')
+)
 
 export default function CategoryDetail() {
   const router = useRouter();
   const { slug = '', page = 1 } = router.query;
+  const [dataCategories, setDataCategories] = useState([])
 
   const categoryName = getNameFromSlug(slug);
   const categoryId = getIdFromSlug(slug);
@@ -43,8 +49,9 @@ export default function CategoryDetail() {
 
       <Breadcrumb categoryId={categoryId} />
 
+
       {!_.isEmpty(router.query) && (
-        <ProductSearch query={query} prefixUrl={`/shop/category/${slug}`} />
+        <ProductSearch query={query} categories ={categoryId} prefixUrl={`/shop/category/${slug}`} />
       )}
     </BasicLayout>
   );
-- 
cgit v1.2.3

